import java.io.*;
public class FileCopy{
    //请完成类的设计
    public FileCopy() {
    }
    public void fileCopy(String str1, String str2) {
        byte[] bin = new byte[16];
        FileInputStream fin = null;
        FileOutputStream fout = null;

        try{
            fin = new FileInputStream(str1);
            fout = new FileOutputStream(str2);
            while (fin.read(bin) != -1) {
                fout.write(bin);
            }
            System.out.println("文件复制完成！");
        } catch(FileNotFoundException e) {
            e.printStackTrace();
        } finally {
            try{
                if(fin != null) {
                    fin.close();
                }
                if (fout != null) {
                    fout.close();
                }
            } catch(IOException e) {
                e.printStackTrace();
            }
        }
    }
}